package boundary;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.JPanel;

import controller.OneTimeOrderInAdvance;
import controller.SubscriptionOrder;

import boundary.SubscriptionOrderGui;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class MainGui extends JFrame{
	static JFrame frame;
	public static JFrame getFrame()
	{
		return frame;
	}
	public MainGui() {
		getContentPane().setLayout(null);
		
		JButton btnOrderSubscription = new JButton("order subscription");
		btnOrderSubscription.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				SubscriptionOrder subOrder=new SubscriptionOrder();
				subOrder.getOrder();
				
			}
		});
		btnOrderSubscription.setBounds(126, 11, 154, 23);
		getContentPane().add(btnOrderSubscription);
		
		JButton btnViewSubscriptions = new JButton("view subscriptions");
		btnViewSubscriptions.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				SubscriptionOrder subOrder=new SubscriptionOrder();
				subOrder.viewOrders();
			}
		});
		btnViewSubscriptions.setBounds(126, 140, 154, 29);
		getContentPane().add(btnViewSubscriptions);
		
		JButton btnOrderSubscriptionFor = new JButton("order subscription for many cars");
		btnOrderSubscriptionFor.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				SubscriptionOrder subOrder=new SubscriptionOrder();
				subOrder.getOrderForManyCars();
			}
		});
		btnOrderSubscriptionFor.setBounds(26, 55, 326, 64);
		getContentPane().add(btnOrderSubscriptionFor);
		
		JButton btnTakeOrder = new JButton("Take order");
		btnTakeOrder.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				OneTimeOrderInAdvance subOrder=new OneTimeOrderInAdvance();
				subOrder.getOrder();
			}
		});
		btnTakeOrder.setBounds(258, 202, 89, 23);
		getContentPane().add(btnTakeOrder);
		
		JButton btnViewOrder = new JButton("View order");
		btnViewOrder.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				OneTimeOrderInAdvance subOrder=new OneTimeOrderInAdvance();
				subOrder.viewOrder();
			}
		});
		btnViewOrder.setBounds(54, 202, 89, 23);
		getContentPane().add(btnViewOrder);
		frame=this;
	}

}
